﻿<ul id="top-menu" class="clearfix">     
    <li><a href="/rules">Rules</a></li>
    <li><a href="/contact">Contact</a></li>
</ul>
<div id="main-menu" class="clearfix">
    <ul class="clearfix">
        <li><a href="/">
            <img alt="home" src="/Content/FrontEnd/images/icon-home.png" /></a></li>
        <li><a href="/mylist">My list</a></li>
        <li><a href="/topview">Top View</a></li>
        @if (User.Identity.Name == "admin")
        {
            <li><a href="/admin">Admin</a></li>
        }
    </ul>
    <div id="search">
        <form action="home/search">
        <input id="txtsearch" name="keyword" type="text" value="search" onblur="if(this.value=='') this.value='search'" onfocus="if(this.value=='search') this.value=''" />
        <input type="image" src="/Content/FrontEnd/images/btnsearch.jpg" />
        </form>
    </div>
</div>

<script type="text/javascript">
    $(function(){
        $('#search form').submit(function (event) {
            event.preventDefault();
            location = "/search/" + $(this).find(':text').val().replace(/\/| |<|>|@@|\*|\./g, '-').replace(/--/g, '-').toLowerCase();
        }); 
    });
</script>